{% extends 'layouts/base.html' %}
{% block content %}
<div class="row">
    <div class="col-xs-12">
        <form class="form-horizontal" action="{{ url('backend/weixinapi/setaccount') }}" method="post">
            <div class="form-group">
              <label class="col-sm-2 control-label">公众号名称：</label>
              <div class="col-sm-5">
                <input type="text" class="form-control"  name="wxName" placeholder="" value="{{list.wxName}}">
              </div>
            </div>
            <div class="form-group">
              <label  class="col-sm-2 control-label">公众号原始id：</label>
              <div class="col-sm-5">
                <input type="text" class="form-control" name="wxID" placeholder="列如：gh_423dwjkeww3 "  value="{{list.wxID}}">
              </div>
            </div>
            <div class="form-group">
              <label  class="col-sm-2 control-label">微信号：</label>
              <div class="col-sm-5">
                <input type="text" class="form-control"  name="account" placeholder="列如：lentu123" value="{{list.account}}">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">AppID（公众号）：</label>
              <div class="col-sm-5">
                <input type="text" class="form-control" name="appID" placeholder="用于自定义菜单等高级功能，必填" value="{{list.appID}}">
              </div>
            </div>
            <div class="form-group">
              <label  class="col-sm-2 control-label">AppSecret：</label>
              <div class="col-sm-5">
                <input type="text" class="form-control" name="appSecret" placeholder="用于自定义菜单等高级功能，必填" value="{{list.appSecret}}">
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-5">
                <button type="submit" class="btn btn-info">提交</button>
              </div>
            </div>
        </form>
    </div>    
</div>

{% endblock %}
{% block script %} 
<script src="{{config['application']['site']['assetsUri']}}admin/js/bootstrapValidator.min.js"></script>
<<script type="text/javascript">
$(document).ready(function() {
	
	//验证表单
    $('.form-horizontal')
        .bootstrapValidator({
            message: 'This value is not valid',
            //live: 'submitted',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                appID: {
                    validators: {
                        notEmpty: {
                            message: 'AppID不能为空！'
                        }
                    }
                },
                appSecret: {
                    validators: {
                        notEmpty: {
                            message: 'appSecret不能为空！'
                        }
                    }
                }
            }
        })
});
</script>
{% endblock %}



